package ysm.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import ysm.entity.News;
import ysm.mapper.NewsMapper;

@Service
public class NewsService {
	
	@Autowired
	private NewsMapper newsMapper;
	
	public void deleteByPrimaryKey(Integer id) {
		newsMapper.deleteByPrimaryKey(id);
	}

	public void insert(News record) {
		newsMapper.insert(record);
	}

	public void insertSelective(News record) {
		newsMapper.insertSelective(record);
	}

	public News selectByPrimaryKey(Integer id) {
		return newsMapper.selectByPrimaryKey(id);
	}

	public void updateByPrimaryKeySelective(News record) {
		newsMapper.updateByPrimaryKeySelective(record);
	}

	public void updateByPrimaryKeyWithBLOBs(News record) {
		newsMapper.updateByPrimaryKeyWithBLOBs(record);
	}

	public void updateByPrimaryKey(News record) {
		newsMapper.updateByPrimaryKeyWithBLOBs(record);
	}
    
	public List loadAllNews() {
		return newsMapper.loadAllNews();
	}

}
